"use client"; /** * TASK-0103 — /w/:workspace/files — the file browser route. * * Renders with the active workspace id (resolved from the * [workspace] route param, which accepts a slug or id). */ import { useParams } from "next/navigation"; import { Loader2 } from "lucide-react"; import { useWorkspace } from "@/hooks/use-workspace"; import { FileBrowser } from "@/components/files/FileBrowser"; export default function FilesBrowserPage() { const params = useParams<{ workspace: string }>(); const slug = params?.workspace ?? ""; const { data: workspace, isLoading } = useWorkspace(slug); if (isLoading) { return (
); } if (!workspace?.id) return null; return ; }